package cn.stylefeng.guns.modular.bi.service.impl;

import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory;
import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.bi.entity.BiCostDiff;
import cn.stylefeng.guns.modular.bi.mapper.BiCostDiffMapper;
import cn.stylefeng.guns.modular.bi.model.params.BiCostDiffParam;
import cn.stylefeng.guns.modular.bi.model.result.BiCostDiffResult;
import  cn.stylefeng.guns.modular.bi.service.BiCostDiffService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * <p>
 * 运费成本差异 服务实现类
 * </p>
 *
 * @author zhangzh
 * @since 2024-05-10
 */
@Service
public class BiCostDiffServiceImpl extends ServiceImpl<BiCostDiffMapper, BiCostDiff> implements BiCostDiffService {


    @Override
    public BiCostDiffResult findBySpec(BiCostDiffParam param){
        return null;
    }

    @Override
    public List<BiCostDiffResult> findListBySpec(BiCostDiffParam param){
        return this.baseMapper.customList(param);
    }

    @Override
    public LayuiPageInfo findPageBySpec(BiCostDiffParam param,String condition){
        Page pageContext = getPageContext();
        IPage page = this.baseMapper.customPageList(pageContext, param,condition);
        return LayuiPageFactory.createPageInfo(page);
    }

    private Page getPageContext() {
        return LayuiPageFactory.defaultPage();
    }


}
